/* stylelint-disable selector-class-pattern */
@duration: 0.3s;
@prefixCls: ym-drawer;
@zIndex: 1050;


.inset-0() {
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.@{prefixCls} {
  // .inset-0();
  // position: fixed;
  // z-index: @zIndex;
  // pointer-events: none;
  // &-inline {
  //   position: absolute;
  // }
  &-mask {
    .inset-0();
    position: fixed;
    z-index: @zIndex; //是基于ym-drawer
    background: rgba(0, 0, 0, 50%);
    pointer-events: auto;
    &-inline {
      position: absolute;
    }
  }

  &-fade-appear,&-fade-enter{
    opacity: 0;
  }
  &-fade-appear-active,&-fade-enter-active{
    transition: all @duration;
    opacity: 1;
  }
  &-fade-leave{
    opacity: 1;
  }
  &-fade-leave-active {
    transition: all @duration;
    opacity: 0;
  }

  &-wrapper{
    position: fixed;
    z-index: @zIndex;
    overflow: hidden;
    transition: transform @duration; //push
    &-inline {
      position: absolute;
    }
  }
  &-left {
    .@{prefixCls}-wrapper{
      top: 0;
      bottom: 0;
      left: 0;
    }
    &-translate-appear,&-translate-enter,&-translate-leave{
      &-start {
        transition: none!important;
      }
    }
    &-translate-appear,&-translate-enter{
      transform: translateX(-100%);
      &-active {
        transition: all @duration;
        transform: translateX(0);
      }
    }
    &-translate-leave {
      transform: translateX(0);

      &-translate-active {
        transform: translateX(-100%)!important;
      }
    }
  }
  &-right {
    .@{prefixCls}-wrapper{
      top: 0;
      right: 0;
      bottom: 0;
    }
    &-translate-appear,&-translate-enter,&-translate-leave{
      &-start {
        transition: none!important;
      }
    }
    &-translate-appear,&-translate-enter{
      transform: translateX(100%);
      &-active {
        transition: all @duration;
        transform: translateX(0);
      }
    }
    &-translate-leave {
      transform: translateX(0);

      &-active {
        transform: translateX(100%)!important;
      }
    }
  }




  &-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    background: #F5F5F5;
  }
  &-header {
    display: flex;
    flex-flow:  row nowrap;
    align-items: center;
    box-sizing: border-box;
    padding: 16px ;
    font-size: 16px;
    border-bottom: 1px solid rgba(5, 5, 5, 6%);
    background: white;
    &-left{
      flex: auto;
      display: flex;
      align-items: center;
      min-width: 0;
      min-height: 0;
      &-title{
        line-height: 1.5;
        font-weight: 600;
        font-size: 16px;
        margin: 0;
        color: rgba(0, 0, 0, 88%);
      }
      &-close{
        display: inline-block;
        margin-inline-end: 12px;
        color: rgba(0, 0, 0, 45%);
        font-weight: 600;
        font-size: 16px;
        font-style: normal;
        line-height: 1;
        text-align: center;
        text-transform: none;
        text-decoration: none;
        background: transparent;
        border: 0;
        outline: 0;
        cursor: pointer;
        transition: color 0.2s;
        text-rendering: auto;
        &:hover{
          color: #000000bf;
          text-decoration: none;
        }
      }
    }
    &-right{
      // flex: none;
    }
  }
  &-body{
    flex: auto;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 16px;
  }
  &-footer{
    padding: 8px 16px;
    box-sizing: border-box;
    border-top: 1px solid rgba(5, 5, 5, 6%);
    background: white;
    &-content{
      display: flex;
      flex-flow: row nowrap;
      align-items: center;
      justify-content: flex-end;
    }
  }
}
